/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistence;

import java.util.List;
import model.BioscoopAdministratieSysteem;
import org.hibernate.Query;
import org.hibernate.Session;

/**
 *
 * @author Matthy & Jelle
 */
public class BioscoopAdministratieSysteemService extends AbstractService{

  @Override
  public boolean validate(Object o) {
    return true;
  }

  public List<BioscoopAdministratieSysteem> getList() {
    List<BioscoopAdministratieSysteem> systemen;
    Session session = HibernateUtil.getSessionFactory().getCurrentSession();
    session.beginTransaction();
    Query query = session.createQuery("from BioscoopAdministratieSysteem");
    systemen = query.list();
    session.getTransaction().commit();
    return systemen;
  }

}
